package com.tianhui.consignortwofei.mvp.model;

import android.content.Context;

import com.fgs.common.CommonModel;
import com.fgs.common.api.CommonConfig;
import com.fgs.common.progress.ObserverResponseListener;
import com.tianhui.consignortwofei.api.AccountApiService;
import com.tianhui.consignortwofei.mvp.model.enty.CaptchaInfo;

import io.reactivex.ObservableTransformer;

/**
 * @author fgs
 * @date 2020/4/14
 * @description
 **/
public class AuthCodeModel<T> extends CommonModel {
    /**
     * 获取验证码
     * @param context
     * @param info
     * @param isDialog
     * @param transformer
     * @param observerListener
     */
    public void authCodeModel(Context context, CaptchaInfo info, boolean isDialog,
                              ObservableTransformer<T, T> transformer, ObserverResponseListener observerListener) {

        subscribe(context, CommonConfig.getInstance().create(AccountApiService.class).getAuthCode(info), observerListener, transformer, isDialog, true);
    }
}
